"""
我的页面操作
"""
from time import sleep
from selenium.webdriver.common.by import By
from cases.basecase import BaseCase
from page.wode import WODE
class TestRrz(BaseCase):
    def test_rrz_st_wd(self):
        #点击我的
        ap = WODE(self.driver)
        ap.dj_wode()
        sleep(1)
        #输入手机号码
        ap.shurushoujihaoam()
        sleep(2)
        #输入验证码
        ap.shuruyanzhenma()
        sleep(2)
        #点击微博登录
        ap.dj_weibodenglu()
        sleep(3)
        #断言
        duanyan = "微博登录"
        duanyan1 = self.driver.find_element(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.TextView[2]').get_attribute('text')
        self.assertEqual(duanyan,duanyan1)
        # 点击返回
        self.driver.press_keycode(4)
        sleep(2)